package com.example.spring_boot_demo;

import com.example.spring_boot_demo.config.GlobalExceptionHandler;
import com.example.spring_boot_demo.utils.AjaxResult;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;

/**
 * <P> @Author: SongKeCheng
 * <P> Type: Class
 * <P> Description:
 * <P> Date: 2024/12/18:8:30
 */

@SuppressWarnings({"unchecked", ""})
@SpringBootApplication
@ServletComponentScan
public class SpringbootOkApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(SpringbootOkApplication.class);
        GlobalExceptionHandler globalExceptionHandler = applicationContext.getBean("globalExceptionHandler", GlobalExceptionHandler.class);
      applicationContext.getBean( GlobalExceptionHandler.class);
        System.out.println(globalExceptionHandler);
    }
}
